//
// Created by 1065246 on 2023/7/20.
//

#include "UnionPerson.h"
#include <iostream>
UnionPerson::UnionPerson(int nums):number(nums),catrgory(Catrgory::Student) {}
UnionPerson::UnionPerson(double idnum):idNum(idnum),catrgory(Catrgory::Local) {}
UnionPerson::UnionPerson(int phone,int addr): foreigner(addr,phone),catrgory(Catrgory::Foreign){}

void UnionPerson::print() {
    std::cout<<"nums:"<<this->number<<std::endl;
    std::cout<<"idNum:"<<this->idNum<<std::endl;
    std::cout<<"phone:"<<this->foreigner.phone<<std::endl;
    std::cout<<"addr:"<<this->foreigner.addr<<std::endl;
}